package objetsBd;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 *
 * @author verpoorten
 */
@Entity
@Table(name = "Locataire")
public class LocataireBd implements Serializable, Cloneable {

    private static final long serialVersionUID = 1L;
    private static final String SEQ_ID = "idLocataire_sequence ";
    @Id
    @SequenceGenerator(name = SEQ_ID,
            sequenceName = SEQ_ID, allocationSize = 1)
    @GeneratedValue(generator = SEQ_ID)
    @Column(name = "idLocataire")
    private Long idLocataire;
    @Column(name = "idPersonne")
    private Long idPersonne;
    @Column(name = "idLocation")
    private Long idLocation;
    //
    @Column(name = "nomReference")
    private String nomReference;
    @Column(name = "societe")
    private String societe;
    @Column(name = "tva")
    private String tva;
    @Column(name = "professionDansBien")
    private String professionDansBien;
    @Column(name = "infosComplementaires")
    //private String numeroCompte;
    private String infosComplementaires;
    @Column(name = "garant")
    private String garant;
    @Column(name = "locatairePrincipal")
    private Boolean locatairePrincipal = true;

    public static LocataireBd parIdLocataire(Long idLocataire) {
        LocataireBd locataire = new LocataireBd();
        locataire.setIdLocataire(idLocataire);
        return locataire;
    }

    public static LocataireBd parIdLocation(Long idLocation, Boolean locatairePrincipal) {
        LocataireBd locataire = new LocataireBd();
        locataire.setIdLocation(idLocation);
        return locataire;
    }

    public static LocataireBd parIdPersonne(Long idPersonne) {
        LocataireBd locataire = new LocataireBd();
        locataire.setIdPersonne(idPersonne);
        return locataire;
    }
    /* public static LocataireBd parNomLocataire(String petName) {
     LocataireBd locataire = new LocataireBd();
     locataire.setNomLocataire(petName);
     return  locataire;
     }*/

    public Long getIdLocataire() {
        return idLocataire;
    }

    public void setIdLocataire(Long idLocataire) {
        this.idLocataire = idLocataire;
    }

    public Long getIdPersonne() {
        return idPersonne;
    }

    public void setIdPersonne(Long idPersonne) {
        this.idPersonne = idPersonne;
    }

    public Long getIdLocation() {
        return idLocation;
    }

    public void setIdLocation(Long idLocation) {
        this.idLocation = idLocation;
    }

    /*public String getNumeroCompte() {
     return numeroCompte;
     }

     public void setNumeroCompte(String numeroCompte) {
     this.numeroCompte = numeroCompte;
     }*/
    public String getRemarqueComplementaire() {
        return infosComplementaires;
    }

    public void setRemarqueComplementaire(String remarqueComplementaire) {
        this.infosComplementaires = remarqueComplementaire;
    }

    public String getNomReference() {
        return nomReference;
    }

    public void setNomReference(String nomReference) {
        this.nomReference = nomReference;
    }

    public String getSociete() {
        return societe;
    }

    public void setSociete(String societe) {
        this.societe = societe;
    }

    public String getTva() {
        return tva;
    }

    public void setTva(String tva) {
        this.tva = tva;
    }

    public String getProfessionDansBien() {
        return professionDansBien;
    }

    public void setProfessionDansBien(String professionDansBien) {
        this.professionDansBien = professionDansBien;
    }

    public String getInfosComplementaires() {
        return infosComplementaires;
    }

    public void setInfosComplementaires(String infosComplementaires) {
        this.infosComplementaires = infosComplementaires;
    }

    public String getGarant() {
        return garant;
    }

    public void setGarant(String garant) {
        this.garant = garant;
    }

    public Boolean getLocatairePrincipal() {
        return locatairePrincipal;
    }

    public void setLocatairePrincipal(Boolean locatairePrincipal) {
        this.locatairePrincipal = locatairePrincipal;
    }

    public LocataireBd createClone() {
        try {
            return (LocataireBd) super.clone();
        } catch (CloneNotSupportedException ex) {
            throw new IllegalStateException(ex);
        }
    }
}
